/* 页面容器 */
.page-container {
	height: 100vh;
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #f5f7fa 0%, #e8ecf1 100%);
	overflow: hidden;
}

/* 顶部栏 */
.top-bar {
	background: #fff;
	padding: 20rpx 30rpx;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
	flex-shrink: 0;
	z-index: 100;
}

/* 广告轮播 */
.adv-swiper {
	width: 100%;
	height: 350rpx;
	margin-bottom: 20rpx;
	border-radius: 16rpx;
	overflow: hidden;
}

.adv-image {
	width: 100%;
	height: 100%;
	display: block;
}

.adv-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.placeholder-text {
	font-size: 32rpx;
	color: #fff;
	font-weight: 600;
}

/* 搜索栏 */
.search-bar {
	margin-bottom: 20rpx;
}

.search-input-wrapper {
	display: flex;
	align-items: center;
	background: #f5f7fa;
	border-radius: 24rpx;
	padding: 0 24rpx;
	border: 2rpx solid transparent;
	transition: all 0.3s;
}

.search-input-wrapper:focus-within {
	background: #fff;
	border-color: #667eea;
	box-shadow: 0 0 0 4rpx rgba(102, 126, 234, 0.1);
}

.search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48rpx;
	height: 48rpx;
	margin-right: 12rpx;
	opacity: 0.6;
}

.search-icon image {
	width: 32rpx;
	height: 32rpx;
	display: block;
}

.search-input {
	flex: 1;
	height: 70rpx;
	font-size: 28rpx;
	color: #2d3748;
	background: transparent;
}

.search-placeholder {
	color: #a0aec0;
}

.clear-icon {
	font-size: 32rpx;
	color: #a0aec0;
	padding: 10rpx;
}

/* 排序栏 */
.sort-bar {
	display: flex;
	gap: 16rpx;
	overflow-x: auto;
	padding-bottom: 4rpx;
}

.sort-item {
	display: flex;
	align-items: center;
	padding: 12rpx 24rpx;
	background: #f5f7fa;
	border-radius: 20rpx;
	font-size: 26rpx;
	color: #4a5568;
	white-space: nowrap;
	transition: all 0.3s;
	border: 2rpx solid transparent;
}

.sort-item.active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
}

.sort-text {
	margin-right: 6rpx;
}

.sort-arrow {
	font-size: 24rpx;
}

/* 主内容区 */
.main-content {
	display: flex;
	flex: 1;
	overflow: hidden;
	min-height: 0;
}

/* 左侧分类栏 */
.category-sidebar {
	width: 180rpx;
	height: 100%;
	background: #fff;
	border-right: 1rpx solid #e2e8f0;
}

.category-title {
	padding: 24rpx 20rpx;
	font-size: 26rpx;
	font-weight: 600;
	color: #2d3748;
	border-bottom: 1rpx solid #e2e8f0;
	text-align: center;
}

.category-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 24rpx 16rpx;
	border-bottom: 1rpx solid #f5f7fa;
	transition: all 0.3s;
	position: relative;
}

.category-item.active {
	background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	border-left: 4rpx solid #667eea;
}

.category-icon {
	font-size: 40rpx;
	margin-bottom: 8rpx;
}

.category-name {
	font-size: 24rpx;
	color: #4a5568;
	text-align: center;
}

.category-item.active .category-name {
	color: #667eea;
	font-weight: 600;
}

.category-count {
	position: absolute;
	top: 16rpx;
	right: 16rpx;
	background: #667eea;
	color: #fff;
	font-size: 20rpx;
	padding: 2rpx 8rpx;
	border-radius: 10rpx;
	min-width: 32rpx;
	text-align: center;
}

/* 右侧商品区域 */
.product-area {
	flex: 1;
	height: 100%;
}

/* 商品网格 */
.product-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20rpx;
	padding: 20rpx;
}

/* 商品卡片 */
.product-card {
	background: #fff;
	border-radius: 20rpx;
	overflow: hidden;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
	transition: all 0.3s;
	position: relative;
}

.product-card:active {
	transform: scale(0.98);
	box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.12);
}

/* 收藏按钮 */
.favorite-btn {
	position: absolute;
	top: 16rpx;
	right: 16rpx;
	width: 56rpx;
	height: 56rpx;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
	z-index: 10;
	backdrop-filter: blur(10px);
}

.favorite-icon {
	font-size: 32rpx;
}

/* 商品图片 */
.product-image {
	width: 100%;
	height: 300rpx;
	object-fit: cover;
}

/* 商品信息 */
.product-info {
	padding: 20rpx;
}

.product-name {
	font-size: 28rpx;
	color: #2d3748;
	font-weight: 500;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.4;
	min-height: 78rpx;
}

.product-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 12rpx;
}

.product-price {
	font-size: 32rpx;
	color: #e53e3e;
	font-weight: 600;
}

.product-sales {
	font-size: 22rpx;
	color: #a0aec0;
}

.product-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 16rpx;
}

.product-stock {
	font-size: 24rpx;
	color: #48bb78;
}

.product-stock.low-stock {
	color: #f56565;
}

.buy-btn {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 20rpx;
	padding: 8rpx 24rpx;
	font-size: 24rpx;
	font-weight: 600;
}

.buy-btn.disabled {
	background: #e2e8f0;
	color: #a0aec0;
}

/* 加载状态 */
.loading-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 100rpx 0;
}

.loading-icon {
	width: 100rpx;
	height: 100rpx;
	margin-bottom: 20rpx;
}

.loading-text {
	font-size: 28rpx;
	color: #a0aec0;
}

/* 空状态 */
.empty-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 100rpx 40rpx;
}

.empty-icon {
	font-size: 120rpx;
	margin-bottom: 20rpx;
	opacity: 0.5;
}

.empty-text {
	font-size: 28rpx;
	color: #a0aec0;
	margin-bottom: 30rpx;
}

.empty-button {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #fff;
	border: none;
	border-radius: 24rpx;
	padding: 16rpx 48rpx;
	font-size: 28rpx;
}

/* 错误状态 */
.error-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 100rpx 40rpx;
}

.error-icon {
	font-size: 120rpx;
	margin-bottom: 20rpx;
}

.error-text {
	font-size: 28rpx;
	color: #e53e3e;
	margin-bottom: 30rpx;
}

.error-button {
	background: #e53e3e;
	color: #fff;
	border: none;
	border-radius: 24rpx;
	padding: 16rpx 48rpx;
	font-size: 28rpx;
}

/* 浮动按钮组 */
.floating-buttons {
	position: fixed;
	right: 30rpx;
	bottom: 100rpx;
	display: flex;
	flex-direction: column;
	gap: 20rpx;
	z-index: 999;
}

.float-btn {
	width: 120rpx;
	height: 120rpx;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8rpx 24rpx rgba(102, 126, 234, 0.4);
	transition: all 0.3s;
}

.float-btn:active {
	transform: scale(0.95);
	box-shadow: 0 4rpx 16rpx rgba(102, 126, 234, 0.3);
}

.float-btn-icon {
	font-size: 48rpx;
	margin-bottom: 4rpx;
}

.float-btn-text {
	font-size: 20rpx;
	color: #fff;
	font-weight: 500;
}

.order-btn {
	background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
	box-shadow: 0 8rpx 24rpx rgba(245, 87, 108, 0.4);
}

.favorite-btn-float {
	background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
	box-shadow: 0 8rpx 24rpx rgba(250, 112, 154, 0.4);
}

	.container {
		display: flex;
		flex-direction: column;
		min-height: 100vh;
		padding: 20rpx;
		box-sizing: border-box;
	}
	
	/* 用户信息栏样式 */
	.user-info-bar {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 30rpx;
		background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
		border-radius: 16rpx;
		margin-bottom: 20rpx;
		box-shadow: 0 4rpx 12rpx rgba(102, 126, 234, 0.3);
	}
	
	.user-info {
		flex: 1;
	}
	
	.user-greeting {
		font-size: 32rpx;
		color: #fff;
		font-weight: 500;
	}
	
	.logout-button {
		background-color: rgba(255, 255, 255, 0.2);
		color: #fff;
		border: 1px solid rgba(255, 255, 255, 0.3);
		border-radius: 30rpx;
		padding: 10rpx 30rpx;
		font-size: 28rpx;
		line-height: 1.5;
	}
	
	.logout-button:active {
		background-color: rgba(255, 255, 255, 0.3);
	}
	
	.product-item-container {
		display: flex;
		flex-direction: row;
		margin-bottom: 30rpx;
		padding: 20rpx;
		background-color: #fff;
		border-radius: 10rpx;
		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
		align-items: center;
	}

	.product-item-info-container {
		display: flex;
		flex-direction: column;
		margin-left: 20rpx;
		flex: 1;
	}

	.product-item-name {
		font-size: 38rpx;
		font-weight: bold;
		margin-bottom: 10rpx;
	}

	.product-item-stock {
		font-size: 30rpx;
		color: grey;
		margin-top: 5rpx;
	}

	.product-item-price {
		font-size: 38rpx;
		font-weight: bold;
		color: coral;
	}

	.product-item-image {
		width: 200rpx;
		height: 200rpx;
		border-radius: 10rpx;
	}

	.button {
		display: inline-flex;
		padding: 0 20px;
	}

	.button[disabled] {
		background-color: #ccc;
		color: #fff;
	}

	.loading-container {
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.loading-text {
		font-size: 40rpx;
		color: grey;
		margin-top: 20rpx;
	}

	.loading-icon {
		width: 80px;
		height: 80px;
	}

	.error-container {
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.error-icon {
		width: 80px;
		height: 80px;
	}

	.error-text {
		color: grey;
		font-size: 30rpx;
		margin-top: 20rpx;
		margin-bottom: 20rpx;
	}

	.error-button {
		font-size: 35rpx;
		color: steelblue;
		background-color: transparent;
	}

	.empty-container {
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.empty-text {
		color: grey;
		font-size: 36rpx;
		margin-bottom: 30rpx;
	}

	.empty-button {
		font-size: 35rpx;
		color: steelblue;
		background-color: transparent;
	}

	.order-list-container {
		position: fixed;
		bottom: 50px;
		right: 20px;
		width: 80rpx;
		height: 80rpx;
		background-color: #08f;
		border-radius: 50%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		box-shadow: 0 4rpx 16rpx rgba(0, 136, 255, 0.3);
	}

	.order-list-container:active {
		opacity: 0.8;
	}

	.order-list-icon-text {
		color: white;
		font-size: 36rpx;
		font-weight: bold;
	}